#ifndef VERTEX_HPP_
#	define VERTEX_HPP_

#	define 	DEPOT		0xFFFFFFFF
#	define 	NOTHING		0x7FFFFFFE

#   include "exc.hpp"

class Vertex
{
	public:
		static double	getDistanceBetween(const Vertex& in1, const Vertex& in2);
	
		Vertex(unsigned inId, double inX, double inY);
		
		void	setPred(Vertex&	inVertex)
		{	
			if (&inVertex == this)
				EXC_THROW("trying to add myself as predecessor");

			vePred = &inVertex;
		}
		
		void	setSucc(Vertex& inVertex)
		{	
			if (&inVertex == this)
				EXC_THROW("trying to add myself as successor");

			veSucc = &inVertex;
		}
		
		const unsigned	veId;
		const double	veX;
		const double	veY;
		
	protected:
		Vertex*		vePred;
		Vertex*		veSucc;
};

#endif
